<%-- 
    Document   : uploadfile
    Created on : May 25, 2012, 11:13:10 AM
    Author     : ems
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="rich" uri="http://richfaces.org/rich"%>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<link rel="stylesheet" type="text/css" href="../css/jquery.fancybox-1.3.4.css"/>
<link rel="stylesheet" type="text/css" href="../css/popup.css"/>
<link rel="stylesheet" type="text/css" href="../css/style.css"/>
<link rel="stylesheet" type="text/css" href="../css/uploadform.css"/>
<style type="text/css">
    body{
        background:none !important;
    }
    .uploadListClass table{
        height:20px !Important;
    }
    form{
        overflow: hidden;
    }
    .rich-fileupload-table-td {height:20px}

    #fancybox-outer {
        width:420px !important;
        height:245px !important;
    }
    .message{
        color: red;
        float: left;
        margin-left: 150px;
        margin-top: 25px;
        font-weight: bold;
    }
</style>
<script>
    var open_cur = 0;
    $j = jQuery.noConflict();
    function closeImport(){
        window.parent.location.href="customerexpand.jsp";
    }
</script>
<f:view>
    <a4j:form id="SERVICE_FORM" >
        <div class="popup" style="height:295px; width:420px; background: white;">

            <div class="popup-header">
                <div class="title"><h:outputText value="Import"/></div>

            </div>
            <div class="popup-content">
                <div class="main_content" style="padding:10px">

                    <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
                    <f:loadBundle basename="queenb.web.resources.jsfmessage" var="messages"/>
                    <h:inputHidden id="flag"  value="#{importBean.flag}" />
                    <div style="float:left;width:410px; height:152px;" >
                        <rich:fileUpload id="uploadDoc1" style="width:100%;border:none;height:100%"
                                         acceptedTypes="csv,xls"
                                         uploadControlLabel="import"
                                         addControlLabel="#{locale.select_file}"
                                         clearAllControlLabel="#{locale.delete_all}"
                                         clearControlLabel="#{locale.delete}"
                                         cancelEntryControlLabel="#{locale.remove}"
                                         doneLabel=""                                            
                                         sizeErrorLabel="#{locale.size_mismatch}."
                                         transferErrorLabel="#{locale.error_upload_process}"
                                         progressLabel="importing ..."
                                         maxFilesQuantity="10"                                         
                                         fileUploadListener="#{importBean.uploadDocListener}"
                                         listHeight="108px"
                                         allowFlash="true"
                                         uploadListClass="uploadListClass">

                            <f:facet name="label">
                                <h:outputText value="import {_KB}#{locale.from_kb} {KB}KB --- {mm}:{ss}"></h:outputText>
                            </f:facet>                         
                            <f:param value="#{importBean.flag}" name="flag"/>
                        </rich:fileUpload>                            
                    </div>                  
                </div>

            </div>

            <div class="popup-footer">
                <div class="buttonsave" onclick="closeImport()"  ><span><h:outputText value="#{locale.close}"/></span></div>

            </div>
        </div>
    </a4j:form>
</f:view>






